using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace RedisDotNet.Tests
{
    [TestClass]
    public class TestSetOperations : TestBase
    {
        [TestMethod]
        public void TestSetAddAndIsMember()
        {
            Assert.IsFalse(redisClient.SetIsMember(Key, "V"));
            Assert.IsTrue(redisClient.SetAdd(Key, "V"));
            Assert.IsTrue(redisClient.SetIsMember(Key, "V"));
        }

        [TestMethod]
        public void TestSetRemove()
        {
            Assert.IsTrue(redisClient.SetAdd(Key, "V"));
            Assert.IsTrue(redisClient.SetRemove(Key, "V"));
            Assert.IsFalse(redisClient.SetIsMember(Key, "V"));
            Assert.IsFalse(redisClient.SetRemove(Key, "Y"));
        }
    }
}
